package edu.zut.hb.software.op.service.impl;

import java.util.ArrayList;
import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import edu.zut.hb.software.base.service.impl.GenericManagerImpl;
import edu.zut.hb.software.op.dao.OpDao;
import edu.zut.hb.software.op.domain.Op;
import edu.zut.hb.software.op.service.OpService;


@Service
@Transactional
public class OpServiceImpl extends GenericManagerImpl<Op,Long> implements OpService {

	OpDao opDao;
	

    @Autowired
    public void setMasterDao(OpDao opDao) {
        this.opDao = opDao;
        this.dao=this.opDao;
    }

    @Override
    public List list() {
        List list = new ArrayList();
        for (int i = 0; i < 10; i++) {
        	Op op = new Op();
        	op.setName("第"+i+"个大师");
        	op.setNum(i);
        	op.setStatus(true);
            list.add(op);
        }
        return list;
    }
}
